import request from "../utils/request";

// 分页查询发货列表
export const deliveryPage = data => {
    return request({
        method: 'POST',
        url: '/delivery/findSendList',
        data
    })
}
// 拣货===> 发货
export const deliveryPicking = id => {
    return request({
        method: 'GET',
        url: '/delivery/performDelivery?id=' + id
    })
}
//  发货 ===> 完成
export const deliverySend = id => {
    return request({
        method: 'GET',
        url: '/delivery/setDelivery?id=' + id
    })
}
// 出库分页
export const deliveryOutBound = data => {
    return request({
        method: 'POST',
        url: '/outbound/findPageOutbound',
        data
    })
}
// 出库前确认
export const deliveryOutConfirm = (id,type) => {
    return request({
        method: 'GET',
        url: '/outbound/confirmOutbound?id=' + id + '&type=' + type
    })
}
// 入库列表
export const deliveryInBound = data => {
    return request({
        method: 'POST',
        url: '/warehouse/findPage',
        data
    })
}
// 确认入库
export const confirmBound = id => {
    return request({
        method: 'GET',
        url: '/warehouse/dealPutStorage?id=' + id
    })
}
// 审核入库
export const examineBound = id => {
    return request({
        method: 'GET',
        url: '/warehouse/audit?id=' + id
    })
}
// 删除入库
export const deleteBound = id => {
    return request({
        method: 'GET',
        url: '/warehouse/deleteById?id=' + id
    })
}
// 新增入库
export const deliveryAdd = data => {
    return request({
        method: 'POST',
        url: '/warehouse/save',
        data
    })
}
// 查看入库
export const detailsBound = id => {
    return request({
        method: 'GET',
        url: '/warehouse/findById?id=' + id
    })
}
// 编辑入库
export const deliveryEdit = data => {
    return request({
        method: 'POST',
        url: '/warehouse/edit',
        data
    })
}
